import { init } from 'snabbdom/init'
import { classModule } from 'snabbdom/modules/class'
import { propsModule } from 'snabbdom/modules/props'
import { styleModule } from 'snabbdom/modules/style'
import { eventListenersModule } from 'snabbdom/modules/eventlisteners'
import { h } from 'snabbdom/h'

const patch = init([classModule,propsModule,styleModule,eventListenersModule])

const myVnode1 = h('a', {props:{ href: 'https://www.baidu.com' ,target:'_blank'}},'百度')

const myVnode2 = h('div',{class:{'box':true}},'I\'m a box')

const myVnode3 = h('ul',[
    h('li', 'a'),
    h('li', 'b'),
    h('li', 'v'),
    h('li', 'd'),
    h('li', 'w'),
])

const container = document.getElementById('container')
// patch(container, myVnode1)
patch(container, myVnode3)